package com.offcn.dongyimaisellergoodsserviceapi.controller;

import com.offcn.dongyimaicommon.utils.Result;
import com.offcn.dongyimaicommon.utils.StatusCode;
import com.offcn.dongyimaisellergoodsserviceapi.service.BrandService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/brand")
public class BrandController {

    @Resource
    private BrandService brandService;

    @GetMapping
    public Result findList(){
        try {
            return new Result(true, StatusCode.OK,"查询成功",brandService.findList());
        } catch (Exception e) {
            e.printStackTrace();
            return new Result(false, StatusCode.ERROR,"查询失败");
        }
    }
}
